home *** CD-ROM | disk | FTP | other *** search
/ Champak 132 / Vol 132.iso / games / nameless.swf / scripts / frame_3 / DoAction.as
Text File  |  2011-06-09  |  908b  |  50 lines

  1. stop();
  2. _root.level = 1;
  3. _root.stopAllSounds();
  4. _root.music.stop();
  5. music = new Sound();
  6. music.attachSound("level1");
  7. music.start();
  8. music.onSoundComplete = function()
  9. {
  10.    music.start();
  11. };
  12. item1 = false;
  13. item2 = false;
  14. item3 = false;
  15. item4 = false;
  16. _root.createEmptyMovieClip("pauseMC",0);
  17. pview._visible = false;
  18. pauseMC.onEnterFrame = function()
  19. {
  20.    if(Key.isDown(80))
  21.    {
  22.       if(pausePress == false)
  23.       {
  24.          if(_root.pauseMode == false)
  25.          {
  26.             _root.pauseMode = true;
  27.          }
  28.          else
  29.          {
  30.             _root.pauseMode = false;
  31.          }
  32.          pausePress = true;
  33.       }
  34.    }
  35.    else
  36.    {
  37.       pausePress = false;
  38.    }
  39.    if(_root.pauseMode == true)
  40.    {
  41.       pview._visible = true;
  42.       _root.music.setVolume(40);
  43.    }
  44.    else
  45.    {
  46.       pview._visible = false;
  47.       _root.music.setVolume(100);
  48.    }
  49. };
  50.